<?php
class MedicinePrice extends ORDataObject{
	var $medicine_id = '';
	var $price = '';
	var $selling_price = '';		
	var $insurance_support = '';	
	
	var $_table = 'medicine_price';
	var $_key = 'medicine_id';
	var $_internalName = 'MedicinePrice';
	
	function MedicinePrice(){
		parent::ORDataObject();		
	}

	function getPrice($medicineId) {
		$sql = "SELECT price FROM $this->_table WHERE medicine_id = $medicineId";
		$res = $this->_execute($sql);
		if ($res && !$res->EOF) {
			return $res->fields['price'];
		}
		return 0;
	}
}
?>